package com.lottery.system.service;

import com.lottery.system.controller.param.DrawPrizeParam;
import com.lottery.system.controller.param.WinningRecordParam;
import com.lottery.system.dao.dataobject.WinningRecordDO;
import com.lottery.system.service.dto.ConvertActivityDTO;
import com.lottery.system.service.dto.WinningRecordDTO;

import java.util.List;

/**
 * @author: xiaoxie
 * create: 2024-09-11 09:22
 * @BelongsProject: lottery-system
 * @BelongsPackage: com.lottery.system.service
 * description: 抽奖的业务逻辑层
 */
public interface DrawPrizeService {
    /**
     * @description: 异步抽奖接口
     * @author: xiaoxie
     * @date: 2024/9/11 9:23
     * @param: [param]
     * @return: void
     **/
    void drawPrize(DrawPrizeParam param);

    /**
     * @description: 校验抽奖参数
     * @author: xiaoxie
     * @date: 2024/9/11 14:26
     * @param: [param]
     * @return: void
     **/
    Boolean checkDrawPrizeParam(DrawPrizeParam param);


    /**
     * @description: 保存中奖信息
     * @author: xiaoxie
     * @date: 2024/9/13 10:34
     * @param: [param]
     * @return: void
     **/
    List<WinningRecordDO> savaActivityWinningInfo(DrawPrizeParam param);

    /**
     * @description: 回滚中奖记录
     * @author: xiaoxie
     * @date: 2024/9/15 21:39
     * @param: [param]
     * @return: void
     **/
    void rollBackWinnerRecords(Long activityId,Long prizeId);

    /**
     * @description: 获取中奖记录
     * @author: xiaoxie
     * @date: 2024/9/16 19:15
     * @param: [param]
     * @return: java.util.List<com.lottery.system.service.dto.WinningRecordDTO>
     **/
    List<WinningRecordDTO> getRecords(WinningRecordParam param);
}
